PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

Font Name Platform Constants

ATSUI identifies the encoding of a particular font name string by a constant of type FontPlatformCode. You can use one of these constants as part of your search criteria in the functions ATSUFindFontFromName and ATSUFindFontName. The function ATSUGetIndFontName passes back a constant of this type to represent the font name string encoding.

The font name platform code identifies the encoding of the name string, which ATSUI uses to determine whether or not it can render the string. A font can support multiple encodings.

IMPORTANT:  Unicode-encoded font name entries have 8-bit instead of the expected 16-bit names. As a result, to locate a Unicode-encoded font name string, you must use the constant kFontMacintoshPlatform with the Unicode script code constant representing the script ID of Unicode encoding you want to find.

You can pass the kFontNoPlatform constant if you do not care about the encoding of a font name string. In this case, ATSUFindFontName and ATSUFindFontFromName will pass back the first font in the name table that matches the other font name parameters that you specified.

enum {
    kFontNoPlatform         = -1,
    kFontUnicodePlatform    = 0,
    kFontMacintoshPlatform  = 1,
    kFontReservedPlatform   = 2,
    kFontMicrosoftPlatform  = 3,
    kFontCustomPlatform     = 4
};
typedef UInt32          FontPlatformCode;

Constant descriptions

kFontNoPlatform
Indicates that you do not care about the platform of the font name. In this case, you will get the first font name in the name table that matches the other parameters you specified. If you specify this constant, you should pass the constant kFontNoScript for the font name's script code.

kFontUnicodePlatform
Identifies the Unicode character code specification as the platform of the font name string.

kFontMacintoshPlatform
Identifies one of the Macintosh character code sets as the platform of the font name string.

kFontReservedPlatform
Reserved for future use.

kFontMicrosoftPlatform
Identifies one of the Microsoft character code sets as the platform of the font name string.

kFontCustomPlatform
Identifies the default platform as defined by the font for the platform of the font name string. If you specify this constant, the character encoding of a font does not correspond to a specific standard.

© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)